import request from "@/utils/request";

const api_name = "/userMessage";

export default {
  getLikeComment() {
    return request({
      url: `${api_name}/likeComment`,
      method: "get",
    });
  },
  getLikeArticle() {
    return request({
      url: `${api_name}/likeArticle`,
      method: "get",
    });
  },
  getCommentMessage() {
    return request({
      url: `${api_name}/commentMessage`,
      method: "get",
    });
  },
  articleLikeMessage() {
    return request({
      url: `${api_name}/articleLikeMessage`,
      method: "get",
    });
  },
  getCommentLikeMessage() {
    return request({
      url: `${api_name}/commentLikeMessage`,
      method: "get",
    });
  },
  getFriendMessage() {
    return request({
      url: `${api_name}/friendMessage`,
      method: "get",
    });
  },
  getMyFriend() {
    return request({
      url: `${api_name}/getMyFriend`,
      method: "get",
    });
  },
  getChat(friendId) {
    return request({
      url: `${api_name}/getChat`,
      method: "post",
      params: { friendId },
    });
  },
  getChatList() {
    return request({
      url: `${api_name}/getChatList`,
      method: "get",
    });
  },
  sendMsg(content, friendId) {
    return request({
      url: `${api_name}/sendMessage`,
      method: "post",
      params: {
        content,
        friendId,
      },
    });
  },
};
